Skip to content

fix(web): correct the reported settings, plan, and update screens - #1370

Merged
frahlg merged 1 commit into
masterfrom
fix/ui-reported-issues
Sep 24, 2026
Merged

frahlg merged 1 commit into
masterfrom
fix/ui-reported-issues

Conversation

@frahlg

@frahlg frahlg commented Sep 24, 2026

Copy link
Copy Markdown
Member

Summary

v0.132.1-beta.1 was already publishing from the previous commit, so this follows in the next beta.

Test

node --test web/settings/devices-add.test.mjs web/ev-commanded-reason.test.mjs web/plan-empty.test.mjs web/update-progress.test.mjs — 8 passed.

No browser on this machine, so the rendered pages were not clicked through.

Easee no longer shows a second password bound to the same field. Adding
a device scrolls that card into view. Charging without a schedule no
longer says the ready time has passed. An empty site does not show a
legacy plan. The update dialog shows measured bytes and says when that
measurement has stopped.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-24T04:52:03.901290Z 1a547da PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1a547da06e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread web/plan.js
Comment on lines +324 to +329
function configuredDeviceCount(status) {
const drivers = status && status.drivers;
if (!drivers) return 0;
if (Array.isArray(drivers)) return drivers.length;
if (typeof drivers === 'object') return Object.keys(drivers).length;
return 0;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Count non-Lua devices before showing the empty state

On an OCPP-only installation, OCPP telemetry is stored without a DriverHealth entry, while /api/status.drivers is assembled from AllHealth() plus configured Lua drivers. Consequently this helper returns zero even though a charger and loadpoint exist, causing the plan to be replaced with “No devices yet” and hiding the valid charging plan. Include configured loadpoints/OCPP chargers, or derive this state from configuration rather than only status.drivers.

AGENTS.md reference: AGENTS.md:L24-L25

Useful? React with 👍 / 👎.

Comment thread web/plan.js
Comment on lines +356 to +362
if (configuredDeviceCount(state.status) === 0) {
ctx.fillStyle = C.dim;
ctx.font = '14px sans-serif';
ctx.fillText('No devices yet. Add one in Settings.', pad.l, pad.t + 28);
const summary = document.getElementById('plan-summary');
if (summary) summary.textContent = 'No devices yet — add a device in Settings, and the plan starts once FTW can see your site.';
return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Clear all plan views before returning from the empty state

When a hot config reload removes the last driver, this branch updates only the canvas and summary before returning. It skips renderPlanBrief, renderCarPlans, fallback-alert cleanup, and the later priceBarBounds reset, so the Overview card, plan badge/action, EV timeline, and hover tooltip can continue showing the previous plan while the header says there are no devices. Reset or explicitly render those dependent views in this branch before returning.

AGENTS.md reference: AGENTS.md:L22-L23

Useful? React with 👍 / 👎.

Comment thread web/app.js
Comment on lines +2886 to +2888
} else if (lp.commanded_known && !lp.commanded_w && lp.commanded_reason === "no_plan_budget" && !hasSchedule) {
text = "No schedule set. Create a schedule or charge manually.";
tone = "var(--text)";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Recognize one-shot targets before declaring no schedule

A supported POST /api/loadpoints/{id}/target can set target_soc and target_time without creating lp.schedule. For such an externally supplied one-shot goal, hasSchedule is false, so this new branch preempts the deadline-aware branch and incorrectly says no schedule exists even while Core is planning toward that target. Treat a valid target/deadline as an active goal here, reserving this copy for loadpoints with neither a schedule nor a one-shot target.

AGENTS.md reference: AGENTS.md:L28-L30

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant